<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/static/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />

</head>

<body class="gray-bg  top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/atcenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>月报列表 <small>日期：{$month|date='Y年m月',###}</small></h5>
                            <div class="ibox-tools" >

                                <a href="javascript:;" id="datepicker" style="color:black;">
                                    <i class="fa fa-calendar"></i>
                                    <input type="text" class="date" id="dateMonth"  value="{$month|date='Y-m',###}" readonly>
                                </a>

                            </div>
                        </div>
                        <div class="ibox-content">

                            <table class="table table-striped table-bordered table-hover dataTables-example">
                                <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>所属人</th>
                                    <th>月报日期</th>
                                    <th>等级</th>
                                    <th>评定系数</th>
                                    <th>审核状态</th>
                                    <th> 操 作 </th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="vo" >
                                    <tr class="gradeU">
                                        <td>{$i}</td>
                                        <td>{$vo.name}</td>
                                        <td>{$vo.date|date='Y-m',###}</td>
                                        <td class="center">
                                            <if condition="$vo['inspector_assess_score']">
                                                {$vo.inspector_assess_score|getMonthlyDj=$vo['inspector_duty_score'],$vo['inspector_active_score'],$vo['inspector_observe_score']}
                                                <else/>
                                                <if condition="$vo['manager_assess_score']">
                                                    {$vo.manager_assess_score|getMonthlyDj=$vo['manager_duty_score'],$vo['manager_active_score'],$vo['manager_observe_score']}
                                                    <else/>
                                                    <if condition="$vo['my_assess_score']">
                                                        {$vo.my_assess_score|getMonthlyDj=$vo['my_duty_score'],$vo['my_active_score'],$vo['my_observe_score']}
                                                    </if>
                                                </if>
                                            </if>
                                        </td>
                                        <td class="center">
                                            <if condition="$vo['inspector_assess_score']">
                                                {$vo.inspector_assess_score|getMonthlyJx=$vo['inspector_duty_score'],$vo['inspector_active_score'],$vo['inspector_observe_score']}
                                                <else/>
                                                <if condition="$vo['manager_assess_score']">
                                                    {$vo.manager_assess_score|getMonthlyJx=$vo['manager_duty_score'],$vo['manager_active_score'],$vo['manager_observe_score']}
                                                    <else/>
                                                    <if condition="$vo['my_assess_score']">
                                                        {$vo.my_assess_score|getMonthlyJx=$vo['my_duty_score'],$vo['my_active_score'],$vo['my_observe_score']}
                                                    </if>
                                                </if>
                                            </if>
                                        </td>
                                        <td class="center">{$vo.status|getMonthlyStatus}</td>
                                        <td class="center">
                                            <if condition="$user['type'] neq '0'">
                                                <if condition="($vo['status'] eq '2') AND ($user['type'] eq '2')">
                                                        <a href="{:U('Monthly/audit')}?id={$vo['id']}">您还未评价</a>
                                                    <elseif condition="($vo['status'] eq '1') AND ($user['type'] eq '3')"/>
                                                        <a href="{:U('Monthly/audit')}?id={$vo['id']}">未评价</a>
                                                    <elseif condition="$vo['status'] eq '0'"/>
                                                        <a href="javascript:;">等待提交</a>
                                                    <elseif condition="($vo['status'] eq '1') AND ($user['type'] eq '2')"/>
                                                        <a href="javascript:;">等待经理评价</a>
                                                    <else/>
                                                        <a href="{:U('Monthly/audit')}?id={$vo['id']}">已审核[查看]</a>
                                                </if>
                                            </if>
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <th>序号</th>
                                    <th>所属人</th>
                                    <th>月报日期</th>
                                    <th>等级</th>
                                    <th>评定系数</th>
                                    <th>审核状态</th>
                                    <th> 操 作 </th>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script>
    $(document).ready(function() {
        $(".dataTables-example").dataTable();
        //日期控件
        $("#datepicker .date").datepicker({format: 'yyyy-mm',minViewMode:1,keyboardNavigation:!1,forceParse:!1,autoclose:!0,todayHighlight:!0});
        //日期选择查询
        $("#dateMonth").on('change',function(){
            var month = $('#dateMonth').val();
            window.location.href="{:U('Attence/index')}?month="+month;
        })
    });
</script>


</body>

</html>